Optimal. Leaf size=95 \[ -\frac{1}{3} \sqrt{2} \tan ^{-1}\left (\frac{1-\frac{x+3}{\sqrt{-x^2-4 x-3}}}{\sqrt{2}}\right )+\frac{1}{3} \sqrt{2} \tan ^{-1}\left (\frac{\frac{x+3}{\sqrt{-x^2-4 x-3}}+1}{\sqrt{2}}\right )+\frac{1}{3} \tanh ^{-1}\left (\frac{x}{\sqrt{-x^2-4 x-3}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.111173, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 8, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.296, Rules used = {986, 12, 1026, 1161, 618, 204, 1027, 206} \[ -\frac{1}{3} \sqrt{2} \tan ^{-1}\left (\frac{1-\frac{x+3}{\sqrt{-x^2-4 x-3}}}{\sqrt{2}}\right )+\frac{1}{3} \sqrt{2} \tan ^{-1}\left (\frac{\frac{x+3}{\sqrt{-x^2-4 x-3}}+1}{\sqrt{2}}\right )+\frac{1}{3} \tanh ^{-1}\left (\frac{x}{\sqrt{-x^2-4 x-3}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 986
Rule 12
Rule 1026
Rule 1161
Rule 618
Rule 204
Rule 1027
Rule 206
Rubi steps
\begin{align*} \int \frac{1}{\sqrt{-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx &=-\left (\frac{1}{6} \int \frac{-6-4 x}{\sqrt{-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\right )+\frac{1}{6} \int -\frac{4 x}{\sqrt{-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\\ &=-\left (\frac{2}{3} \int \frac{x}{\sqrt{-3-4 x-x^2} \left (3+4 x+2 x^2\right )} \, dx\right )+\operatorname{Subst}\left (\int \frac{1}{3-3 x^2} \, dx,x,\frac{x}{\sqrt{-3-4 x-x^2}}\right )\\ &=\frac{1}{3} \tanh ^{-1}\left (\frac{x}{\sqrt{-3-4 x-x^2}}\right )-\frac{16}{3} \operatorname{Subst}\left (\int \frac{1+3 x^2}{-4-8 x^2-36 x^4} \, dx,x,\frac{1+\frac{x}{3}}{\sqrt{-3-4 x-x^2}}\right )\\ &=\frac{1}{3} \tanh ^{-1}\left (\frac{x}{\sqrt{-3-4 x-x^2}}\right )+\frac{2}{9} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{3}-\frac{2 x}{3}+x^2} \, dx,x,\frac{1+\frac{x}{3}}{\sqrt{-3-4 x-x^2}}\right )+\frac{2}{9} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{3}+\frac{2 x}{3}+x^2} \, dx,x,\frac{1+\frac{x}{3}}{\sqrt{-3-4 x-x^2}}\right )\\ &=\frac{1}{3} \tanh ^{-1}\left (\frac{x}{\sqrt{-3-4 x-x^2}}\right )-\frac{4}{9} \operatorname{Subst}\left (\int \frac{1}{-\frac{8}{9}-x^2} \, dx,x,\frac{2}{3} \left (-1+\frac{3+x}{\sqrt{-3-4 x-x^2}}\right )\right )-\frac{4}{9} \operatorname{Subst}\left (\int \frac{1}{-\frac{8}{9}-x^2} \, dx,x,\frac{2}{3} \left (1+\frac{3+x}{\sqrt{-3-4 x-x^2}}\right )\right )\\ &=-\frac{1}{3} \sqrt{2} \tan ^{-1}\left (\frac{1-\frac{3+x}{\sqrt{-3-4 x-x^2}}}{\sqrt{2}}\right )+\frac{1}{3} \sqrt{2} \tan ^{-1}\left (\frac{1+\frac{3+x}{\sqrt{-3-4 x-x^2}}}{\sqrt{2}}\right )+\frac{1}{3} \tanh ^{-1}\left (\frac{x}{\sqrt{-3-4 x-x^2}}\right )\\ \end{align*}
Mathematica [C] time = 0.109496, size = 150, normalized size = 1.58 \[ \frac{1}{6} i \left (\sqrt{1-2 i \sqrt{2}} \tanh ^{-1}\left (\frac{\left (2-i \sqrt{2}\right ) x-2 i \sqrt{2}+2}{\sqrt{2+4 i \sqrt{2}} \sqrt{-x^2-4 x-3}}\right )-\sqrt{1+2 i \sqrt{2}} \tanh ^{-1}\left (\frac{\left (2+i \sqrt{2}\right ) x+2 i \sqrt{2}+2}{\sqrt{2-4 i \sqrt{2}} \sqrt{-x^2-4 x-3}}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.1, size = 121, normalized size = 1.3 \begin{align*} -{\frac{\sqrt{4}\sqrt{3}}{18}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12} \left ( \sqrt{2}\arctan \left ({\frac{\sqrt{2}}{6}\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}} \right ) +{\it Artanh} \left ( 3\,{\frac{x}{-3/2-x}{\frac{1}{\sqrt{3\,{\frac{{x}^{2}}{ \left ( -3/2-x \right ) ^{2}}}-12}}}} \right ) \right ){\frac{1}{\sqrt{{ \left ({{x}^{2} \left ( -{\frac{3}{2}}-x \right ) ^{-2}}-4 \right ) \left ( 1+{x \left ( -{\frac{3}{2}}-x \right ) ^{-1}} \right ) ^{-2}}}}} \left ( 1+{x \left ( -{\frac{3}{2}}-x \right ) ^{-1}} \right ) ^{-1}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{{\left (2 \, x^{2} + 4 \, x + 3\right )} \sqrt{-x^{2} - 4 \, x - 3}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.60765, size = 365, normalized size = 3.84 \begin{align*} -\frac{1}{6} \, \sqrt{2} \arctan \left (\frac{\sqrt{2} x + 3 \, \sqrt{2} \sqrt{-x^{2} - 4 \, x - 3}}{2 \,{\left (2 \, x + 3\right )}}\right ) - \frac{1}{6} \, \sqrt{2} \arctan \left (-\frac{\sqrt{2} x - 3 \, \sqrt{2} \sqrt{-x^{2} - 4 \, x - 3}}{2 \,{\left (2 \, x + 3\right )}}\right ) - \frac{1}{12} \, \log \left (-\frac{2 \, \sqrt{-x^{2} - 4 \, x - 3} x + 4 \, x + 3}{x^{2}}\right ) + \frac{1}{12} \, \log \left (\frac{2 \, \sqrt{-x^{2} - 4 \, x - 3} x - 4 \, x - 3}{x^{2}}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{- \left (x + 1\right ) \left (x + 3\right )} \left (2 x^{2} + 4 x + 3\right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.25614, size = 223, normalized size = 2.35 \begin{align*} -\frac{1}{3} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\frac{3 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + 1\right )}\right ) - \frac{1}{3} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (\frac{\sqrt{-x^{2} - 4 \, x - 3} - 1}{x + 2} + 1\right )}\right ) + \frac{1}{6} \, \log \left (\frac{2 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac{3 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 1\right ) - \frac{1}{6} \, \log \left (\frac{2 \,{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}}{x + 2} + \frac{{\left (\sqrt{-x^{2} - 4 \, x - 3} - 1\right )}^{2}}{{\left (x + 2\right )}^{2}} + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]